package com.xul.yygh.sta.controller;

import com.xul.yygh.common.result.Result;
import com.xul.yygh.order.client.OrderFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import model.com.xul.yygh.vo.order.OrderCountQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author xul
 * @create 2021-07-21 15:14
 */
@Api(tags = "统计数据接口")
@RestController
@RequestMapping("admin/statistics")
public class StatisticsController {

    @Autowired
    private OrderFeignClient orderFeignClient;


    /**
     * 获取预约统计数据
     * @param orderCountQueryVo
     * @return
     */
    @ApiOperation("获取预约统计数据")
    @GetMapping("getCountMap")
    public Result getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> countMap = orderFeignClient.getCountMap(orderCountQueryVo);
        return Result.ok(countMap);
    }

}
